package next.fire.mq.inner;

import next.fire.mq.client.RetryableMessageOperator;
import next.fire.mq.client.impl.RabbitConnectionFactory;

import java.io.IOException;

import static java.util.concurrent.TimeUnit.MINUTES;
import static java.util.concurrent.TimeUnit.SECONDS;

public class BaseOperatorMain {

    public static void main(String[] args) throws IOException, InterruptedException {

        RetryableMessageOperator rmo = new RetryableMessageOperator();
        RabbitConnectionFactory cf = new RabbitConnectionFactory();
        cf.setFullUri("amqp://_test_05_01:0501_test@120.25.135.172:5681/_test_05_01");
        rmo.setConnectionFactory(cf);

        rmo.init();
        Thread.sleep(SECONDS.toMillis(3));


        Thread.sleep(MINUTES.toMillis(5));
    }
}
